# Maintainer: Linus Swälas <linus.swalas@borderless.se>
pkgname=xf86-video-amdgpu
pkgver=19.1.0
pkgrel=0
pkgdesc="AMD Rx/HDxxxx video driver"
url="https://xorg.freedesktop.org"
arch="all"
license="MIT"
subpackages="$pkgname-doc"
options="!check"
depends="mesa-dri-ati"
makedepends="xorg-server-dev libxi-dev libdrm-dev mesa-dev eudev-dev pixman-dev
	util-macros xorgproto libpciaccess-dev"
source="https://www.x.org/releases/individual/driver/xf86-video-amdgpu-$pkgver.tar.bz2"

build() {
	export LDFLAGS="$LDFLAGS -Wl,-z,lazy"

	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
	install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
}

sha512sums="ccdaa2378492da1a2f3d18fedacd1318c4708da534a8a959276a82730d5420619d83ad1ec8d7835c55655fe56123cd9bffb44e6223c5a97033c01f598af4a173  xf86-video-amdgpu-19.1.0.tar.bz2"
